<!DOCTYPE HTML>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Blog</title>
  <link rel="stylesheet" href="stylesheets/style.css" />
</head>
<body>
  <header>
  <h1><%= title %></h1>
  </header> 
  <nav>
    <span><a href="/" title="主页">home</a></span>
    <% if(locals.user){ %>
    <span><a href="/post" title="登录">post</a></span>
    <span><a href="/logout" title="注册">logout</a></span>
    <% }else{ %>
    <span><a href="/login" title="登录">login</a></span>
    <span><a href="/reg" title="注册">register</a></span>
    <% } %>
  </nav>
  <article>
  <% if (locals.success) { %>
  <div ><%= locals.success %></div>
  <% } %>
  <% if (locals.error) { %>
  <div><%= locals.error %> </div>
  <% } %>
